import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/Login'
import Register from '@/views/Register'
import Home from '@/views/Home'
import StudentList from '@/views/student/StudentList'
import StudentAdd from '@/views/student/StudentAdd'
import ClassesList from '@/views/classes/ClassesList'
import ClassesAdd from '@/views/classes/ClassesAdd'
Vue.use(VueRouter)
const routes=[
    {
        path:'/login',
        component:Login
    },
    {
        path:'/register',
        component:Register
    },
    {
        path:'/home',
        component:Home,
        children:[
            {
                path:'studentsList',
                component:StudentList
            },
            {
                path:'studentsAdd',
                component:StudentAdd
            },
            {
                path:'classesList',
                component:ClassesList
            },
            {
                path:'classesAdd',
                component:ClassesAdd
            }
        ]
    }
]
const router=new VueRouter({
    routes
})
export default router